package com.antgroup.seckill.business.common.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author wangxy
 * @date 2024/8/18 16:08
 */
@Data
@Component
@ConfigurationProperties(prefix = "elasticsearch")
public class ElasticsearchProperties {
    private String uris;
    private String username;
    private String password;
    private int connectionTimeout;
    private int socketTimeout;

    /**
     * Gets the value of uris
     *
     * @return the value of uris
     */
    public String getUris() {
        return uris;
    }

    /**
     * Sets the uris
     * <p>You can use getUris() to get the value of uris</p>
     *
     * @param uris uris
     */
    public void setUris(String uris) {
        this.uris = uris;
    }

    /**
     * Gets the value of username
     *
     * @return the value of username
     */
    public String getUsername() {
        return username;
    }

    /**
     * Sets the username
     * <p>You can use getUsername() to get the value of username</p>
     *
     * @param username username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Gets the value of password
     *
     * @return the value of password
     */
    public String getPassword() {
        return password;
    }

    /**
     * Sets the password
     * <p>You can use getPassword() to get the value of password</p>
     *
     * @param password password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * Gets the value of connectionTimeout
     *
     * @return the value of connectionTimeout
     */
    public int getConnectionTimeout() {
        return connectionTimeout;
    }

    /**
     * Sets the connectionTimeout
     * <p>You can use getConnectionTimeout() to get the value of connectionTimeout</p>
     *
     * @param connectionTimeout connectionTimeout
     */
    public void setConnectionTimeout(int connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

    /**
     * Gets the value of socketTimeout
     *
     * @return the value of socketTimeout
     */
    public int getSocketTimeout() {
        return socketTimeout;
    }

    /**
     * Sets the socketTimeout
     * <p>You can use getSocketTimeout() to get the value of socketTimeout</p>
     *
     * @param socketTimeout socketTimeout
     */
    public void setSocketTimeout(int socketTimeout) {
        this.socketTimeout = socketTimeout;
    }
}
